package org.lc.stk.model.paper;

import org.hibernate.annotations.Comment;
import org.lc.stk.model.question.attrs.QuestionType;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

/**
 * 试卷题型分值设置
 * todo 试题分值设置还需要重构
 */
@Entity
@Table(name = "questionTypeScorePair")
@Comment("试卷题型分值设置")
public class QuestionTypeScorePair {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    /**
     * 组卷方案
     */
    @ManyToOne
    @Comment("组卷方案")
    private PaperGenerationStrategy generalStrategy;

    /**
     * 题型
     */
    @ManyToOne
    @Comment("题型")
    private QuestionType questionType;

    /**
     * 总分
     */
    @Column
    @Comment("总分")
    private Integer totalScore;

    /**
     * 题量
     */
    @Column
    @Comment("题量")
    private Integer count;

    /**
     * 在试卷中的顺序
     */
    @Column(name = "[order]")
    @Comment("在试卷中的顺序")
    private Integer order;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    

    public PaperGenerationStrategy getGeneralStrategy() {
        return generalStrategy;
    }
    public void setGeneralStrategy(PaperGenerationStrategy generalStrategy) {
        this.generalStrategy = generalStrategy;
    }

    public QuestionType getQuestionType() {
        return questionType;
    }

    public void setQuestionType(QuestionType questionType) {
        this.questionType = questionType;
    }

    public Integer getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Integer totalScore) {
        this.totalScore = totalScore;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }
}
